<template>
  <div class="position">
    <el-row
      class="main-header"
      type="flex"
      justify="space-between"
      align="middle"
    >
      <el-col :span="10" class="line-height">
        <span class="header-title">居家托养服务管理系统</span>
      </el-col>
      <el-col :span="3" class="admin" :offset="10">
        <div class="demo-type">
          <div>
            <el-avatar icon="el-icon-user-solid"></el-avatar>
          </div>
        </div>
      </el-col>
      <!-- <span><i class="el-icon-user-solid"></i>管理员</span> -->
      <el-col :span="2">
        <el-link type="primary" class="ml" @click.prevent="exit"
          ><i class="el-icon-switch-button"></i>退出</el-link
        >
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  methods: {
    exit() {
      sessionStorage.removeItem("token");
      sessionStorage.removeItem("index");
      this.$router.push("/login");
    },
  },
};
</script>

<style lang="less" scoped>
.main-header {
  height: 60px;
  background-color: rgb(252, 248, 248);
  margin-left: -20px;
}
.position {
  position: fixed;
  z-index: 1;
  width: 100%;
}
.header-title {
  margin-left: 30px;
  color: #20b9ae;
  font-size: 22px;
  font-weight: bolder;
}
.ml {
  margin-left: 20px;
  font-size: 18px;
}
.admin {
  font-size: 18px;
  text-align: center;
}
.el-avatar {
  margin-left: 120px;
}
</style>